<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox-content">
					<form class="form-horizontal m-t" id="fm">
						<input id="id" name="id" th:value="${record.id}"
							type="hidden">
						<input id="userId" name="userId" th:value="${record.userId}"
							type="hidden">
						<div class="form-group">
							<label class="col-sm-3 control-label">账号：</label>
							<div class="col-sm-8">
								<input id="username" name="username" class="form-control"
									type="text" th:value="${record.username}" readonly>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">手机号码：</label>
							<div class="col-sm-8">
								<input id="mobile" name="mobile" class="form-control" type="text"
									th:value="${record.mobile}" readonly>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">提现金额：</label>
							<div class="col-sm-8">
								<input id="commission" name="commission" class="form-control" type="text"
									th:value="${record.commission}" readonly>
							</div>
						</div>
						<div  th:if=" ${record.checkStatus} gt '0' " class="form-group">
							<label class="col-sm-3 control-label">状态:</label>
							<div class="col-sm-8">
								<label class="col-sm-3 control-label">已经审核完成</label>
							</div>
						</div>
						<div th:if=" ${record.checkStatus} eq '0' " class="form-group">
							<label class="col-sm-3 control-label">状态:</label>
							<div class="col-sm-8">
								<label class="radio-inline"> <input type="radio"
									name="checkStatus" value="1" checked="checked"/> 通过，已提现
								</label> <label class="radio-inline"> <input type="radio"
									name="checkStatus" value="2" /> 不通过，审核失败
								</label>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-8 col-sm-offset-3">
								<button type="button" onclick="apply()" class="btn btn-primary">提交</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript">
	function apply() {
		$.ajax({
			cache : true,
			type : "POST",
			url : "/sys/managerCommission/update",
			data : $('#fm').serialize(),// 你的formid
			async : false,
			error : function(request) {
				alert("Connection error");
			},
			success : function(data) {
				
				if (data.code == 0) {
					parent.layer.msg("审核成功");
					parent.reLoad();
					var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
					parent.layer.close(index);
				} else {
					parent.layer.msg(data.msg);
				}
			}
		});
	}
	</script>
</body>
</html>
